package com.atguigu.gulimall.product.feign.fallback;

import com.atguigu.common.exception.BizCodeEnum;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.product.feign.SecKillFeignService;
import org.springframework.stereotype.Component;

/**
 * @author 胡忠智
 * @date 2022/1/28-23:12
 * @Description TODO
 */
@Component
public class SeckillFallbackService implements SecKillFeignService {
    @Override
    public R getSeckillSkuInfo(Long skuId) {
        System.out.println("熔断方法被调用");
        return R.error(BizCodeEnum.READ_TIME_OUT_EXCEPTION.getCode(), BizCodeEnum.READ_TIME_OUT_EXCEPTION.getMsg());
    }
}
